<template>
	<view class="item-box">
		<view class="info">
			<text class="text">{{modelValue.user_name}}</text>
			<text class="text">{{modelValue.mobile}}</text>
		</view>
		<view class="btns" v-if="needDelete">
			<text class="del">删除</text>
		</view>
	</view>
</template>

<script lang="ts" setup>
	defineProps({
		modelValue: {
			type: Object,
			required: true,
		},
		needDelete: {
			type: Boolean,
			default: false,
		}
	})
</script>

<style lang="scss">
	.item-box {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 0rpx;
		border-bottom: 1px solid $uni-border-color;

		.text {
			padding-right: 20rpx;
		}

		.del {
			background-color: $uni-color-error;
			color: $uni-text-color-inverse;
			padding: 10rpx;
			font-size: 0.8em;
		}
	}
</style>